convert binary to decimal in cpp